package com.example.provider.serivce;

import com.example.User;
import com.example.UserService;
import framework.annotation.XService;

import java.util.ArrayList;
import java.util.List;

//@XService(group = "user", version = "v11")
@XService
public class impl implements UserService {
    @Override
    public List<User> listUser() {
        ArrayList<User> users = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            users.add(new User(("name-" + i), "kkk-" + i));
        }
        return users;
    }

    @Override
    public String addUser(User user) {
        if (user == null) {
            System.out.println("user is null");
        }
        System.out.println(user.toString());
        return "收到了";
    }
}
